platform :ios, '9.0'

use_frameworks!

target 'Example' do
    pod 'yoga', path: '../node_modules/react-native/ReactCommon/yoga/'
    pod 'React', path: '../node_modules/react-native/', :subspecs => [
    'Core',
    'ART',
    'RCTActionSheet',
    'RCTAnimation',
    'RCTLinkingIOS',
    'RCTGeolocation',
    'RCTImage',
    'RCTNetwork',
    'RCTText',
    'RCTVibration',
    'RCTWebSocket',
    'DevSupport',
    'CxxBridge',
    ]
    
    pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
    pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
    pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
    
    pod 'RNCharts', :path => '../../'
end

swift4 = ['Charts']

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      if swift4.include?(target.name)
        config.build_settings['SWIFT_VERSION'] = '4.1'
      end
    end
  end
end